package typeCheck;

import java.util.LinkedHashMap;

public class FunctionType extends Type {

    private LinkedHashMap<String, Type> parameters;

    private LinkedHashMap<String, Type> results;
    public FunctionType(String name) {
        super(name, TypeEnum.FUNCTION);
        this.parameters = new LinkedHashMap<>();
        this.results = new LinkedHashMap<>();
    }

    public LinkedHashMap<String, Type> getParameters() {
        return this.parameters;
    }

    public LinkedHashMap<String, Type> getResults() {
        return this.results;
    }

    public void addParameter(String name, Type type) {
        this.parameters.put(name, type);
    }

    public void addResult(String name, Type type) {
        this.results.put(name, type);
    }
}
